package com.ruoyi.common.enums;

/**
 * 用户状态
 * 
 * @author ruoyi
 */
public enum EDirection
{
    IN(1L, "进"),
    OUT(2L, "出");

    private final Long code;
    private final String info;

    EDirection(Long code, String info)
    {
        this.code = code;
        this.info = info;
    }

    public Long getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfoByCode(Long code){
        EDirection[] eRecordTypes = values();
        for (EDirection recordType : eRecordTypes) {
            if ((recordType.code).equals(code)) {
                return recordType.getInfo();
            }
        }
        return "";
    }
}
